package mini.util;

import java.util.Map;

/**
 * Utilities
 * 
 * @author Meyer
 */
public class MiniUtil {

	/**
	 * See what's in the environment
	 * @param env - Map 
	 * @return Stirng, labeled key/value pairs
	 */
	public static String printEnvironment(Map<String,Integer> env) {
		StringBuilder sb = new StringBuilder();
		for(Map.Entry<String, Integer> entrySet: env.entrySet()) {
			sb.append(" [key: ");
			sb.append(entrySet.getKey());
			sb.append(" value: ");
			sb.append((entrySet.getValue() != null ? entrySet.getValue() : "null"));
			sb.append("] ");
		}
		return sb.toString();
	}
}
